package com.shqcjd.preinstallglass.ui.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Handler;

import com.shqcjd.preinstallglass.R;
import com.shqcjd.preinstallglass.ui.base.BaseActivity;
import com.shqcjd.preinstallglass.ui.base.BasePresenter;

public class SplashActivity extends BaseActivity {

    private Context mContext;

    @Override
    protected boolean isFullScreen() {
        return true;
    }

    @Override
    protected BasePresenter createPresenter() {
        return null;
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_splash;
    }

    @Override
    public void initView() {
        super.initView();
        mContext = this;
        goIndex();

    }

    private void goIndex() {
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                //延迟两秒钟执行
                startActivity(new Intent(mContext, MainActivity.class));
                finish();
            }
        }, 2000);
    }
}
